package com.dragon.modules.yuegou.query.pay;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.pay.RefundRecordEntity;
import com.dragon.modules.yuegou.enums.pay.RefundRecordStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * 退款记录表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-03-18 16:40:41
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class RefundRecordQuery extends RefundRecordEntity implements Query<RefundRecordEntity>{

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 支付id查询条件 */
	@JsonUnwrapped(prefix = "payId")
	private Condition<String> payIdCondition;

    /** 商户订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 退款单号查询条件 */
	@JsonUnwrapped(prefix = "refundNo")
	private Condition<String> refundNoCondition;

    /** 退款金额查询条件 */
	@JsonUnwrapped(prefix = "refundFee")
	private Condition<BigDecimal> refundFeeCondition;

    /** 【枚举】退款类型：0-微信-WEICHANT、 1-支付宝-ALIPAY、 2-悦卡-YUECARD、 3-悦币-YUECOIN、4-积分-POINTS查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<Integer> typeCondition;

    /** [枚举]状态：0-部分退款-PART_REFUND、1-全部退款-ALL_REFUND查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<RefundRecordStatus> statusCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 结果：0-申请中-APPLY、1-退款成功-SUCCESS、1-退款失败-FAILURE查询条件 */
	@JsonUnwrapped(prefix = "results")
	private Condition<Integer> resultsCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "version")
	private Condition<Integer> versionCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public RefundRecordQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public RefundRecordQuery(RefundRecordEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public RefundRecordQuery(RefundRecordQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.payIdCondition != null) {
			this.payIdCondition = other.payIdCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.refundNoCondition != null) {
			this.refundNoCondition = other.refundNoCondition.copy();
		}
		if(other.refundFeeCondition != null) {
			this.refundFeeCondition = other.refundFeeCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.resultsCondition != null) {
			this.resultsCondition = other.resultsCondition.copy();
		}
		if(other.versionCondition != null) {
			this.versionCondition = other.versionCondition.copy();
		}
	}

	@Override
	public QueryWrapper<RefundRecordEntity> toQueryWrapper() {
		QueryWrapper<RefundRecordEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (payIdCondition != null) {
			payIdCondition.toWrapper(wrapper, COL_PAY_ID);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (refundNoCondition != null) {
			refundNoCondition.toWrapper(wrapper, COL_REFUND_NO);
		}
		if (refundFeeCondition != null) {
			refundFeeCondition.toWrapper(wrapper, COL_REFUND_FEE);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (resultsCondition != null) {
			resultsCondition.toWrapper(wrapper, COL_RESULTS);
		}
		if (versionCondition != null) {
			versionCondition.toWrapper(wrapper, COL_VERSION);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回支付id查询条件
	 * 
	 * @return payIdCondition 支付id查询条件
	 */
	public Condition<String> payId() {
		this.payIdCondition = new Condition<>();
		return this.payIdCondition;
	}
	
	/**
	 * 获取支付id查询条件
	 * 
	 * @return payIdCondition 支付id查询条件
	 */
	public Condition<String> getPayIdCondition() {
		return payIdCondition;
	}

	/**
	 * 设置支付id查询条件
	 * 
	 * @param payIdCondition 支付id查询条件
	 */
	public void setPayIdCondition(Condition<String> payIdCondition) {
		this.payIdCondition = payIdCondition;
	}

	/**
	 * 构造并返回商户订单号查询条件
	 * 
	 * @return orderNoCondition 商户订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取商户订单号查询条件
	 * 
	 * @return orderNoCondition 商户订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置商户订单号查询条件
	 * 
	 * @param orderNoCondition 商户订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回退款单号查询条件
	 * 
	 * @return refundNoCondition 退款单号查询条件
	 */
	public Condition<String> refundNo() {
		this.refundNoCondition = new Condition<>();
		return this.refundNoCondition;
	}
	
	/**
	 * 获取退款单号查询条件
	 * 
	 * @return refundNoCondition 退款单号查询条件
	 */
	public Condition<String> getRefundNoCondition() {
		return refundNoCondition;
	}

	/**
	 * 设置退款单号查询条件
	 * 
	 * @param refundNoCondition 退款单号查询条件
	 */
	public void setRefundNoCondition(Condition<String> refundNoCondition) {
		this.refundNoCondition = refundNoCondition;
	}

	/**
	 * 构造并返回退款金额查询条件
	 * 
	 * @return refundFeeCondition 退款金额查询条件
	 */
	public Condition<BigDecimal> refundFee() {
		this.refundFeeCondition = new Condition<>();
		return this.refundFeeCondition;
	}
	
	/**
	 * 获取退款金额查询条件
	 * 
	 * @return refundFeeCondition 退款金额查询条件
	 */
	public Condition<BigDecimal> getRefundFeeCondition() {
		return refundFeeCondition;
	}

	/**
	 * 设置退款金额查询条件
	 * 
	 * @param refundFeeCondition 退款金额查询条件
	 */
	public void setRefundFeeCondition(Condition<BigDecimal> refundFeeCondition) {
		this.refundFeeCondition = refundFeeCondition;
	}

	/**
	 * 构造并返回【枚举】退款类型：0-微信-WEICHANT、 1-支付宝-ALIPAY、 2-悦卡-YUECARD、 3-悦币-YUECOIN、4-积分-POINTS查询条件
	 * 
	 * @return typeCondition 【枚举】退款类型：0-微信-WEICHANT、 1-支付宝-ALIPAY、 2-悦卡-YUECARD、 3-悦币-YUECOIN、4-积分-POINTS查询条件
	 */
	public Condition<Integer> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}
	
	/**
	 * 获取【枚举】退款类型：0-微信-WEICHANT、 1-支付宝-ALIPAY、 2-悦卡-YUECARD、 3-悦币-YUECOIN、4-积分-POINTS查询条件
	 * 
	 * @return typeCondition 【枚举】退款类型：0-微信-WEICHANT、 1-支付宝-ALIPAY、 2-悦卡-YUECARD、 3-悦币-YUECOIN、4-积分-POINTS查询条件
	 */
	public Condition<Integer> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置【枚举】退款类型：0-微信-WEICHANT、 1-支付宝-ALIPAY、 2-悦卡-YUECARD、 3-悦币-YUECOIN、4-积分-POINTS查询条件
	 * 
	 * @param typeCondition 【枚举】退款类型：0-微信-WEICHANT、 1-支付宝-ALIPAY、 2-悦卡-YUECARD、 3-悦币-YUECOIN、4-积分-POINTS查询条件
	 */
	public void setTypeCondition(Condition<Integer> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回[枚举]状态：0-部分退款-PART_REFUND、1-全部退款-ALL_REFUND查询条件
	 * 
	 * @return statusCondition [枚举]状态：0-部分退款-PART_REFUND、1-全部退款-ALL_REFUND查询条件
	 */
	public Condition<RefundRecordStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]状态：0-部分退款-PART_REFUND、1-全部退款-ALL_REFUND查询条件
	 * 
	 * @return statusCondition [枚举]状态：0-部分退款-PART_REFUND、1-全部退款-ALL_REFUND查询条件
	 */
	public Condition<RefundRecordStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]状态：0-部分退款-PART_REFUND、1-全部退款-ALL_REFUND查询条件
	 * 
	 * @param statusCondition [枚举]状态：0-部分退款-PART_REFUND、1-全部退款-ALL_REFUND查询条件
	 */
	public void setStatusCondition(Condition<RefundRecordStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedTimeCondition 查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回结果：0-申请中-APPLY、1-退款成功-SUCCESS、1-退款失败-FAILURE查询条件
	 * 
	 * @return resultsCondition 结果：0-申请中-APPLY、1-退款成功-SUCCESS、1-退款失败-FAILURE查询条件
	 */
	public Condition<Integer> results() {
		this.resultsCondition = new Condition<>();
		return this.resultsCondition;
	}
	
	/**
	 * 获取结果：0-申请中-APPLY、1-退款成功-SUCCESS、1-退款失败-FAILURE查询条件
	 * 
	 * @return resultsCondition 结果：0-申请中-APPLY、1-退款成功-SUCCESS、1-退款失败-FAILURE查询条件
	 */
	public Condition<Integer> getResultsCondition() {
		return resultsCondition;
	}

	/**
	 * 设置结果：0-申请中-APPLY、1-退款成功-SUCCESS、1-退款失败-FAILURE查询条件
	 * 
	 * @param resultsCondition 结果：0-申请中-APPLY、1-退款成功-SUCCESS、1-退款失败-FAILURE查询条件
	 */
	public void setResultsCondition(Condition<Integer> resultsCondition) {
		this.resultsCondition = resultsCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return versionCondition 查询条件
	 */
	public Condition<Integer> version() {
		this.versionCondition = new Condition<>();
		return this.versionCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return versionCondition 查询条件
	 */
	public Condition<Integer> getVersionCondition() {
		return versionCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param versionCondition 查询条件
	 */
	public void setVersionCondition(Condition<Integer> versionCondition) {
		this.versionCondition = versionCondition;
	}

}
